3.1894 \(\int \sqrt{a+\frac{b}{x^2}} \, dx\)

Optimal. Leaf size=42 \[ x \sqrt{a+\frac{b}{x^2}}-\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b}}{x \sqrt{a+\frac{b}{x^2}}}\right ) \]

[Out]

Sqrt[a + b/x^2]*x - Sqrt[b]*ArcTanh[Sqrt[b]/(Sqrt[a + b/x^2]*x)]

________________________________________________________________________________________

Rubi [A]  time = 0.0184578, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {242, 277, 217, 206} \[ x \sqrt{a+\frac{b}{x^2}}-\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b}}{x \sqrt{a+\frac{b}{x^2}}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b/x^2],x]

[Out]

Sqrt[a + b/x^2]*x - Sqrt[b]*ArcTanh[Sqrt[b]/(Sqrt[a + b/x^2]*x)]

Rule 242

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^2, x], x, 1/x] /; FreeQ[{a, b, p},
x] && ILtQ[n, 0]

Rule 277

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^p)/(c*(m +
1)), x] - Dist[(b*n*p)/(c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{a+\frac{b}{x^2}} \, dx &=-\operatorname{Subst}\left (\int \frac{\sqrt{a+b x^2}}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{a+\frac{b}{x^2}} x-b \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\frac{1}{x}\right )\\ &=\sqrt{a+\frac{b}{x^2}} x-b \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{1}{\sqrt{a+\frac{b}{x^2}} x}\right )\\ &=\sqrt{a+\frac{b}{x^2}} x-\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b}}{\sqrt{a+\frac{b}{x^2}} x}\right )\\ \end{align*}

Mathematica [A]  time = 0.0231535, size = 62, normalized size = 1.48 \[ x \sqrt{a+\frac{b}{x^2}}-\frac{\sqrt{b} x \sqrt{a+\frac{b}{x^2}} \tanh ^{-1}\left (\frac{\sqrt{a x^2+b}}{\sqrt{b}}\right )}{\sqrt{a x^2+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b/x^2],x]

[Out]

Sqrt[a + b/x^2]*x - (Sqrt[b]*Sqrt[a + b/x^2]*x*ArcTanh[Sqrt[b + a*x^2]/Sqrt[b]])/Sqrt[b + a*x^2]

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 61, normalized size = 1.5 \begin{align*}{x\sqrt{{\frac{a{x}^{2}+b}{{x}^{2}}}} \left ( \sqrt{a{x}^{2}+b}-\sqrt{b}\ln \left ( 2\,{\frac{\sqrt{b}\sqrt{a{x}^{2}+b}+b}{x}} \right ) \right ){\frac{1}{\sqrt{a{x}^{2}+b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+1/x^2*b)^(1/2),x)

[Out]

((a*x^2+b)/x^2)^(1/2)*x/(a*x^2+b)^(1/2)*((a*x^2+b)^(1/2)-b^(1/2)*ln(2*(b^(1/2)*(a*x^2+b)^(1/2)+b)/x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.57956, size = 259, normalized size = 6.17 \begin{align*} \left [x \sqrt{\frac{a x^{2} + b}{x^{2}}} + \frac{1}{2} \, \sqrt{b} \log \left (-\frac{a x^{2} - 2 \, \sqrt{b} x \sqrt{\frac{a x^{2} + b}{x^{2}}} + 2 \, b}{x^{2}}\right ), x \sqrt{\frac{a x^{2} + b}{x^{2}}} + \sqrt{-b} \arctan \left (\frac{\sqrt{-b} x \sqrt{\frac{a x^{2} + b}{x^{2}}}}{a x^{2} + b}\right )\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x^2)^(1/2),x, algorithm="fricas")

[Out]

[x*sqrt((a*x^2 + b)/x^2) + 1/2*sqrt(b)*log(-(a*x^2 - 2*sqrt(b)*x*sqrt((a*x^2 + b)/x^2) + 2*b)/x^2), x*sqrt((a*
x^2 + b)/x^2) + sqrt(-b)*arctan(sqrt(-b)*x*sqrt((a*x^2 + b)/x^2)/(a*x^2 + b))]

________________________________________________________________________________________

Sympy [A]  time = 1.43792, size = 56, normalized size = 1.33 \begin{align*} \frac{\sqrt{a} x}{\sqrt{1 + \frac{b}{a x^{2}}}} - \sqrt{b} \operatorname{asinh}{\left (\frac{\sqrt{b}}{\sqrt{a} x} \right )} + \frac{b}{\sqrt{a} x \sqrt{1 + \frac{b}{a x^{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x**2)**(1/2),x)

[Out]

sqrt(a)*x/sqrt(1 + b/(a*x**2)) - sqrt(b)*asinh(sqrt(b)/(sqrt(a)*x)) + b/(sqrt(a)*x*sqrt(1 + b/(a*x**2)))

________________________________________________________________________________________

Giac [A]  time = 1.20758, size = 92, normalized size = 2.19 \begin{align*}{\left (\frac{b \arctan \left (\frac{\sqrt{a x^{2} + b}}{\sqrt{-b}}\right )}{\sqrt{-b}} + \sqrt{a x^{2} + b}\right )} \mathrm{sgn}\left (x\right ) - \frac{{\left (b \arctan \left (\frac{\sqrt{b}}{\sqrt{-b}}\right ) + \sqrt{-b} \sqrt{b}\right )} \mathrm{sgn}\left (x\right )}{\sqrt{-b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x^2)^(1/2),x, algorithm="giac")

[Out]

(b*arctan(sqrt(a*x^2 + b)/sqrt(-b))/sqrt(-b) + sqrt(a*x^2 + b))*sgn(x) - (b*arctan(sqrt(b)/sqrt(-b)) + sqrt(-b
)*sqrt(b))*sgn(x)/sqrt(-b)